package com.hy.erp.inventory.pojo;

import java.io.Serializable ;

import javax.persistence.Column ;
import javax.persistence.Entity ;
import javax.persistence.FetchType ;
import javax.persistence.Id ;
import javax.persistence.NamedQueries ;
import javax.persistence.NamedQuery ;
import javax.persistence.OneToOne ;
import javax.persistence.Table ;

import org.hibernate.annotations.Index ;
import org.jboss.seam.ScopeType ;
import org.jboss.seam.annotations.Name ;
import org.jboss.seam.annotations.Scope ;

import com.hy.erp.inventory.dao.interfaces.IProductCharacteristicDao;
import com.hy.erp.inventory.pojo.interfaces.IMembereRelation;
import com.hy.erp.inventory.pojo.interfaces.IProductCharacteristic;
import com.hy.erp.inventory.pojo.interfaces.IRoleType;
import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.api.annotation.DaoA;
import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.entity.AbstractPersistentEntity;

/**
 * <ul>
 * <li>开发作者：汤莉</li>
 * <li>设计日期：2010-10-6；时间：上午09:53:01</li>
 * <li>字段类型：long；字段名称：serialVersionUID</li>
 * <li>设计目的：物料特征</li>
 * </ul>
 * <ul>
 * <b>修订编号：</b>
 * <li>修订日期：</li>
 * <li>修订作者：</li>
 * <li>修订原因：</li>
 * <li>修订内容：</li>
 * </ul>
 */
/*
  @ NamedQueries (

            	{
//            		@ NamedQuery ( name = "findProductCharacteristicsByMaterielId" , query = "SELECT"
//            															+ " productCharacteristic"
//            															+ " FROM"
//            															+ " com.pojo.ProductCharacteristic productCharacteristic , com.pojo.Materiel materiel "
//            															+    " WHERE materiel.characteristic.identifier = productCharacteristic.identifier and"
//            															+ " materiel.identifier = :materielIdentifier"
//            															

            	//	)    ,
            		
            		@ NamedQuery ( name = "findProductCharacteristicByMaterielId" , query = "SELECT"
						+ " materiel.characteristic"
						+ " FROM"
						+ " com.pojo.Materiel materiel "
						+ " WHERE "
						+ " materiel.identifier = :materielIdentifier"
						

)    

            
            	} ) */
//@Entity
/*@Name("productcharacteristic")
@Scope(ScopeType.SESSION)
@Table(name="productCharacteristic")
@DaoA(IProductCharacteristicDao.class)*/
public class ProductCharacteristic extends AbstractPersistentEntity
									implements
									IProductCharacteristic
{

	
	private static final long	serialVersionUID	=
														6157155879766459883L ;

	/**
	 * 构造函数
	 */
	public ProductCharacteristic(){}

	

	//#######################################################################
	
	

	@Column(name="characteristicName",unique=false,nullable=false,insertable=true,updatable=true)
	@Index(name="characteristicNameIndex")
	public String getCharacteristicName ( )
	{
		return this.get(IProductCharacteristic.CHARACTERISTICNAME) ;
	}
	
	//#######################################################################

	

	public void setCharacteristicName (
										String characteristicName )
	{
		super.set(IProductCharacteristic.CHARACTERISTICNAME,characteristicName) ;
	}
	
	@Column(name="description",unique=false,nullable=false,insertable=true,updatable=true)
	public String getDescription ( )
	{
		return this.get(IProductCharacteristic.DESCRIPTION) ;
	}
	public void setDescription (
									String description )
	{
		super.set(IProductCharacteristic.DESCRIPTION, description);
	}
	
	@Column(name="characteristicValue",unique=false,nullable=false,insertable=true,updatable=true)
	@Index(name="characteristicNameIndex")
	public String getCharacteristicValue ( )
	{
		return this.get(IProductCharacteristic.CHARACTERISTICVALUE) ;
	}
	public void setCharacteristicValue (
										String characteristicValue )
	{
		super.set(IProductCharacteristic.CHARACTERISTICVALUE,characteristicValue) ;
	}
	@OneToOne(targetEntity=Units.class,fetch=FetchType.LAZY)
	public String getUnits ( )
	{
		return this.get(IProductCharacteristic.UNITS) ;
	}
	public void setUnits (
										Units units )
	{
		super.set(IProductCharacteristic.UNITS,units) ;
	}
}
